﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace scom_a3_web.jonathan_svc
{
    public partial class Location_test : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void btn_Submit_Click(object sender, EventArgs e)
        {
            string address = txt_Input.Text;
            ServiceReference3.RequiredServices_JStanleyClient client = new ServiceReference3.RequiredServices_JStanleyClient();
            string[] resultArray = client.getLocationMap(address);
            if (resultArray.Count() > 0)
            {
                lbl_Output.Text = resultArray[0];
            }
            else
            {
                lbl_Output.Text = "Address did not return results, please try again";
            }
        }
    }
}